<template>
	<uni-popup ref="fahuo_pop">
		<view class="fahuo4s">
			<view class="title">
				发货确认
			</view>
			<view class="black_1">
				<text class="text1">如未收到买家转账，请选否立即申诉\n否则资金将无法追回!</text>
				<view class="text2">
					<view class="text4" >是否收到买家转账?</view>请登入收款账户查看，买家
					<text class="text3">转账金额</text>
					是否与<text class="text3">订单金额一致</text>
				</view>

			</view>
			<view class="black_2" @click="select(0)">
				<uni-icons :type="type == 0?'checkbox':'circle'" size="20" :color="type == 0? '#FE903D':'#969696'"> </uni-icons>
				<text class="text1">是</text>
			</view>
			<view class="black_2"  @click="select(1)">
				<uni-icons :type="type == 0?'circle':'checkbox'" size="20" :color="type==0?'#969696':'#FE903D'"> </uni-icons>
				<text class="text1">否(如未到账或金额不一致请选否)</text>
			</view>
			<view class="submit" @click="sumbit()">{{type == 0?'发货':'立即申诉'}}</view>

		</view>
		<view style="height: 20px;"></view>
		<view class="bottom">
			<image class="close" @click="close" src="/static/my/close2.png"></image>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		props:{
			success:{
				type:Function,
			}
		},
		name: "fahuo",
		data() {
			return {
				type: 0,
				id:''
			};
		},
		methods: {
			opne(id) {
				this.id = id
				this.$refs.fahuo_pop.open()
			},
			close() {
				this.$refs.fahuo_pop.close()
			},
			select(index){
				this.type = index
			},
			sumbit(){
				if(this.type == 1){
					uni.navigateTo({
						url: '/pages/trading/appeal?id=' + this.id
					})
					this.close()
					return
				}
				this.success()
				this.close()
			}

		}
	}
</script>

<style scoped lang="less">
	.fahuo4s {
		background: white;
		border-radius: 10px;
		padding: 10px 10px 40px 10px ;

		.title {
			text-align: center;
			font-size: 32rpx;
			font-weight: 800;
			color: #2A2A2A;
			padding: 5px;
		}

		.black_1 {
			border-radius: 10px;
			text-align: center;
			.text1{
				text-align: center;
				font-size: 28rpx;
				font-weight: 800;
				color: #FF3939;
				
			}
			.text4{
				margin-bottom: 10px;
			}
			.text2{
				margin-top: 20px;
				text-align: start;
				font-size: 25rpx;
				font-weight: 400;
				color: #666666;
				
				.text3{
					color: #FF3939;
					
				}
			}
		}
		.black_2{
			margin-top: 15px;
			padding: 0px 10px 0px 10px;
			display: flex;
			align-items: center;
			.text1{
				margin-left: 10px;
				font-size: 25rpx;
				font-weight: 400;
				color: #666666;
			}
		}
		
		.submit{
			background: #FE903D;
			border-radius: 14rpx;
			margin: 40px 10px 10px 10px;
			padding: 10px;
			text-align: center;
			font-size: 35rpx;
			font-weight: bold;
			color: #FFFFFF;
		}

	}

	.bottom {
		text-align: center;
		
	}

	.close {
		text-align: center;
		margin: auto;
		width: 30px;
		height: 30px;
	}
</style>